3.1.95 \(\int \frac {2 \sqrt {a}-x^2}{a-\sqrt {a} x^2+x^4} \, dx\)

Optimal. Leaf size=122 \[ -\frac {\sqrt {3} \log \left (-\sqrt {3} \sqrt [4]{a} x+\sqrt {a}+x^2\right )}{4 \sqrt [4]{a}}+\frac {\sqrt {3} \log \left (\sqrt {3} \sqrt [4]{a} x+\sqrt {a}+x^2\right )}{4 \sqrt [4]{a}}-\frac {\tan ^{-1}\left (\sqrt {3}-\frac {2 x}{\sqrt [4]{a}}\right )}{2 \sqrt [4]{a}}+\frac {\tan ^{-1}\left (\frac {2 x}{\sqrt [4]{a}}+\sqrt {3}\right )}{2 \sqrt [4]{a}} \]

________________________________________________________________________________________

Rubi [A]  time = 0.08, antiderivative size = 122, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 5, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.161, Rules used = {1169, 634, 617, 204, 628} \begin {gather*} -\frac {\sqrt {3} \log \left (-\sqrt {3} \sqrt [4]{a} x+\sqrt {a}+x^2\right )}{4 \sqrt [4]{a}}+\frac {\sqrt {3} \log \left (\sqrt {3} \sqrt [4]{a} x+\sqrt {a}+x^2\right )}{4 \sqrt [4]{a}}-\frac {\tan ^{-1}\left (\sqrt {3}-\frac {2 x}{\sqrt [4]{a}}\right )}{2 \sqrt [4]{a}}+\frac {\tan ^{-1}\left (\frac {2 x}{\sqrt [4]{a}}+\sqrt {3}\right )}{2 \sqrt [4]{a}} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(2*Sqrt[a] - x^2)/(a - Sqrt[a]*x^2 + x^4),x]

[Out]

-ArcTan[Sqrt[3] - (2*x)/a^(1/4)]/(2*a^(1/4)) + ArcTan[Sqrt[3] + (2*x)/a^(1/4)]/(2*a^(1/4)) - (Sqrt[3]*Log[Sqrt
[a] - Sqrt[3]*a^(1/4)*x + x^2])/(4*a^(1/4)) + (Sqrt[3]*Log[Sqrt[a] + Sqrt[3]*a^(1/4)*x + x^2])/(4*a^(1/4))

Rule 204

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> -Simp[ArcTan[(Rt[-b, 2]*x)/Rt[-a, 2]]/(Rt[-a, 2]*Rt[-b, 2]), x] /
; FreeQ[{a, b}, x] && PosQ[a/b] && (LtQ[a, 0] || LtQ[b, 0])

Rule 617

Int[((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> With[{q = 1 - 4*Simplify[(a*c)/b^2]}, Dist[-2/b, Sub
st[Int[1/(q - x^2), x], x, 1 + (2*c*x)/b], x] /; RationalQ[q] && (EqQ[q^2, 1] ||  !RationalQ[b^2 - 4*a*c])] /;
 FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 628

Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Simp[(d*Log[RemoveContent[a + b*x +
c*x^2, x]])/b, x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[2*c*d - b*e, 0]

Rule 634

Int[((d_.) + (e_.)*(x_))/((a_) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Dist[(2*c*d - b*e)/(2*c), Int[1/(a +
 b*x + c*x^2), x], x] + Dist[e/(2*c), Int[(b + 2*c*x)/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c, d, e}, x] &
& NeQ[2*c*d - b*e, 0] && NeQ[b^2 - 4*a*c, 0] &&  !NiceSqrtQ[b^2 - 4*a*c]

Rule 1169

Int[((d_) + (e_.)*(x_)^2)/((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4), x_Symbol] :> With[{q = Rt[a/c, 2]}, With[{r =
Rt[2*q - b/c, 2]}, Dist[1/(2*c*q*r), Int[(d*r - (d - e*q)*x)/(q - r*x + x^2), x], x] + Dist[1/(2*c*q*r), Int[(
d*r + (d - e*q)*x)/(q + r*x + x^2), x], x]]] /; FreeQ[{a, b, c, d, e}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2
- b*d*e + a*e^2, 0] && NegQ[b^2 - 4*a*c]

Rubi steps

\begin {align*} \int \frac {2 \sqrt {a}-x^2}{a-\sqrt {a} x^2+x^4} \, dx &=\frac {\int \frac {2 \sqrt {3} a^{3/4}-3 \sqrt {a} x}{\sqrt {a}-\sqrt {3} \sqrt [4]{a} x+x^2} \, dx}{2 \sqrt {3} a^{3/4}}+\frac {\int \frac {2 \sqrt {3} a^{3/4}+3 \sqrt {a} x}{\sqrt {a}+\sqrt {3} \sqrt [4]{a} x+x^2} \, dx}{2 \sqrt {3} a^{3/4}}\\ &=\frac {1}{4} \int \frac {1}{\sqrt {a}-\sqrt {3} \sqrt [4]{a} x+x^2} \, dx+\frac {1}{4} \int \frac {1}{\sqrt {a}+\sqrt {3} \sqrt [4]{a} x+x^2} \, dx-\frac {\sqrt {3} \int \frac {-\sqrt {3} \sqrt [4]{a}+2 x}{\sqrt {a}-\sqrt {3} \sqrt [4]{a} x+x^2} \, dx}{4 \sqrt [4]{a}}+\frac {\sqrt {3} \int \frac {\sqrt {3} \sqrt [4]{a}+2 x}{\sqrt {a}+\sqrt {3} \sqrt [4]{a} x+x^2} \, dx}{4 \sqrt [4]{a}}\\ &=-\frac {\sqrt {3} \log \left (\sqrt {a}-\sqrt {3} \sqrt [4]{a} x+x^2\right )}{4 \sqrt [4]{a}}+\frac {\sqrt {3} \log \left (\sqrt {a}+\sqrt {3} \sqrt [4]{a} x+x^2\right )}{4 \sqrt [4]{a}}+\frac {\operatorname {Subst}\left (\int \frac {1}{-\frac {1}{3}-x^2} \, dx,x,1-\frac {2 x}{\sqrt {3} \sqrt [4]{a}}\right )}{2 \sqrt {3} \sqrt [4]{a}}-\frac {\operatorname {Subst}\left (\int \frac {1}{-\frac {1}{3}-x^2} \, dx,x,1+\frac {2 x}{\sqrt {3} \sqrt [4]{a}}\right )}{2 \sqrt {3} \sqrt [4]{a}}\\ &=-\frac {\tan ^{-1}\left (\sqrt {3}-\frac {2 x}{\sqrt [4]{a}}\right )}{2 \sqrt [4]{a}}+\frac {\tan ^{-1}\left (\sqrt {3}+\frac {2 x}{\sqrt [4]{a}}\right )}{2 \sqrt [4]{a}}-\frac {\sqrt {3} \log \left (\sqrt {a}-\sqrt {3} \sqrt [4]{a} x+x^2\right )}{4 \sqrt [4]{a}}+\frac {\sqrt {3} \log \left (\sqrt {a}+\sqrt {3} \sqrt [4]{a} x+x^2\right )}{4 \sqrt [4]{a}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [C]  time = 0.15, size = 115, normalized size = 0.94 \begin {gather*} \frac {\sqrt [4]{-1} \left (\sqrt {\sqrt {3}-i} \left (\sqrt {3}-3 i\right ) \tanh ^{-1}\left (\frac {(1+i) x}{\sqrt {\sqrt {3}+i} \sqrt [4]{a}}\right )-\sqrt {\sqrt {3}+i} \left (\sqrt {3}+3 i\right ) \tan ^{-1}\left (\frac {(1+i) x}{\sqrt {\sqrt {3}-i} \sqrt [4]{a}}\right )\right )}{2 \sqrt {6} \sqrt [4]{a}} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(2*Sqrt[a] - x^2)/(a - Sqrt[a]*x^2 + x^4),x]

[Out]

((-1)^(1/4)*(-(Sqrt[I + Sqrt[3]]*(3*I + Sqrt[3])*ArcTan[((1 + I)*x)/(Sqrt[-I + Sqrt[3]]*a^(1/4))]) + Sqrt[-I +
 Sqrt[3]]*(-3*I + Sqrt[3])*ArcTanh[((1 + I)*x)/(Sqrt[I + Sqrt[3]]*a^(1/4))]))/(2*Sqrt[6]*a^(1/4))

________________________________________________________________________________________

IntegrateAlgebraic [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {2 \sqrt {a}-x^2}{a-\sqrt {a} x^2+x^4} \, dx \end {gather*}

Verification is not applicable to the result.

[In]

IntegrateAlgebraic[(2*Sqrt[a] - x^2)/(a - Sqrt[a]*x^2 + x^4),x]

[Out]

IntegrateAlgebraic[(2*Sqrt[a] - x^2)/(a - Sqrt[a]*x^2 + x^4), x]

________________________________________________________________________________________

fricas [B]  time = 1.07, size = 251, normalized size = 2.06 \begin {gather*} \frac {1}{2} \, \sqrt {\frac {1}{2}} \sqrt {\frac {\sqrt {3} a \sqrt {-\frac {1}{a}} + \sqrt {a}}{a}} \log \left (\sqrt {\frac {1}{2}} \sqrt {a} \sqrt {\frac {\sqrt {3} a \sqrt {-\frac {1}{a}} + \sqrt {a}}{a}} + x\right ) - \frac {1}{2} \, \sqrt {\frac {1}{2}} \sqrt {\frac {\sqrt {3} a \sqrt {-\frac {1}{a}} + \sqrt {a}}{a}} \log \left (-\sqrt {\frac {1}{2}} \sqrt {a} \sqrt {\frac {\sqrt {3} a \sqrt {-\frac {1}{a}} + \sqrt {a}}{a}} + x\right ) + \frac {1}{2} \, \sqrt {\frac {1}{2}} \sqrt {-\frac {\sqrt {3} a \sqrt {-\frac {1}{a}} - \sqrt {a}}{a}} \log \left (\sqrt {\frac {1}{2}} \sqrt {a} \sqrt {-\frac {\sqrt {3} a \sqrt {-\frac {1}{a}} - \sqrt {a}}{a}} + x\right ) - \frac {1}{2} \, \sqrt {\frac {1}{2}} \sqrt {-\frac {\sqrt {3} a \sqrt {-\frac {1}{a}} - \sqrt {a}}{a}} \log \left (-\sqrt {\frac {1}{2}} \sqrt {a} \sqrt {-\frac {\sqrt {3} a \sqrt {-\frac {1}{a}} - \sqrt {a}}{a}} + x\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-x^2+2*a^(1/2))/(a+x^4-x^2*a^(1/2)),x, algorithm="fricas")

[Out]

1/2*sqrt(1/2)*sqrt((sqrt(3)*a*sqrt(-1/a) + sqrt(a))/a)*log(sqrt(1/2)*sqrt(a)*sqrt((sqrt(3)*a*sqrt(-1/a) + sqrt
(a))/a) + x) - 1/2*sqrt(1/2)*sqrt((sqrt(3)*a*sqrt(-1/a) + sqrt(a))/a)*log(-sqrt(1/2)*sqrt(a)*sqrt((sqrt(3)*a*s
qrt(-1/a) + sqrt(a))/a) + x) + 1/2*sqrt(1/2)*sqrt(-(sqrt(3)*a*sqrt(-1/a) - sqrt(a))/a)*log(sqrt(1/2)*sqrt(a)*s
qrt(-(sqrt(3)*a*sqrt(-1/a) - sqrt(a))/a) + x) - 1/2*sqrt(1/2)*sqrt(-(sqrt(3)*a*sqrt(-1/a) - sqrt(a))/a)*log(-s
qrt(1/2)*sqrt(a)*sqrt(-(sqrt(3)*a*sqrt(-1/a) - sqrt(a))/a) + x)

________________________________________________________________________________________

giac [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: TypeError} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-x^2+2*a^(1/2))/(a+x^4-x^2*a^(1/2)),x, algorithm="giac")

[Out]

Exception raised: TypeError >> An error occurred running a Giac command:INPUT:sage2:=int(sage0,x):;OUTPUT:sym2
poly/r2sym(const gen & e,const index_m & i,const vecteur & l) Error: Bad Argument Value

________________________________________________________________________________________

maple [A]  time = 0.05, size = 96, normalized size = 0.79 \begin {gather*} \frac {\arctan \left (\frac {2 x +\sqrt {3}\, a^{\frac {1}{4}}}{a^{\frac {1}{4}}}\right )}{2 a^{\frac {1}{4}}}-\frac {\arctan \left (\frac {-2 x +\sqrt {3}\, a^{\frac {1}{4}}}{a^{\frac {1}{4}}}\right )}{2 a^{\frac {1}{4}}}+\frac {\sqrt {3}\, \ln \left (x^{2}+\sqrt {3}\, a^{\frac {1}{4}} x +\sqrt {a}\right )}{4 a^{\frac {1}{4}}}-\frac {\sqrt {3}\, \ln \left (-x^{2}+\sqrt {3}\, a^{\frac {1}{4}} x -\sqrt {a}\right )}{4 a^{\frac {1}{4}}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((-x^2+2*a^(1/2))/(a+x^4-a^(1/2)*x^2),x)

[Out]

1/4*ln(x^2+a^(1/4)*x*3^(1/2)+a^(1/2))*3^(1/2)/a^(1/4)+1/2/a^(1/4)*arctan((2*x+3^(1/2)*a^(1/4))/a^(1/4))-1/4/a^
(1/4)*3^(1/2)*ln(a^(1/4)*x*3^(1/2)-x^2-a^(1/2))-1/2/a^(1/4)*arctan((3^(1/2)*a^(1/4)-2*x)/a^(1/4))

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} -\int \frac {x^{2} - 2 \, \sqrt {a}}{x^{4} - \sqrt {a} x^{2} + a}\,{d x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-x^2+2*a^(1/2))/(a+x^4-x^2*a^(1/2)),x, algorithm="maxima")

[Out]

-integrate((x^2 - 2*sqrt(a))/(x^4 - sqrt(a)*x^2 + a), x)

________________________________________________________________________________________

mupad [B]  time = 5.06, size = 159, normalized size = 1.30 \begin {gather*} 2\,\mathrm {atanh}\left (x\,\sqrt {\frac {1}{8\,\sqrt {a}}-\frac {\sqrt {-27\,a^3}}{24\,a^2}}-\frac {9\,a^{3/2}\,x\,\sqrt {\frac {1}{8\,\sqrt {a}}-\frac {\sqrt {-27\,a^3}}{24\,a^2}}}{\sqrt {-27\,a^3}}\right )\,\sqrt {\frac {1}{8\,\sqrt {a}}-\frac {\sqrt {-27\,a^3}}{24\,a^2}}+2\,\mathrm {atanh}\left (x\,\sqrt {\frac {\sqrt {-27\,a^3}}{24\,a^2}+\frac {1}{8\,\sqrt {a}}}+\frac {9\,a^{3/2}\,x\,\sqrt {\frac {\sqrt {-27\,a^3}}{24\,a^2}+\frac {1}{8\,\sqrt {a}}}}{\sqrt {-27\,a^3}}\right )\,\sqrt {\frac {\sqrt {-27\,a^3}}{24\,a^2}+\frac {1}{8\,\sqrt {a}}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((2*a^(1/2) - x^2)/(a + x^4 - a^(1/2)*x^2),x)

[Out]

2*atanh(x*(1/(8*a^(1/2)) - (-27*a^3)^(1/2)/(24*a^2))^(1/2) - (9*a^(3/2)*x*(1/(8*a^(1/2)) - (-27*a^3)^(1/2)/(24
*a^2))^(1/2))/(-27*a^3)^(1/2))*(1/(8*a^(1/2)) - (-27*a^3)^(1/2)/(24*a^2))^(1/2) + 2*atanh(x*((-27*a^3)^(1/2)/(
24*a^2) + 1/(8*a^(1/2)))^(1/2) + (9*a^(3/2)*x*((-27*a^3)^(1/2)/(24*a^2) + 1/(8*a^(1/2)))^(1/2))/(-27*a^3)^(1/2
))*((-27*a^3)^(1/2)/(24*a^2) + 1/(8*a^(1/2)))^(1/2)

________________________________________________________________________________________

sympy [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: PolynomialError} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-x**2+2*a**(1/2))/(a+x**4-x**2*a**(1/2)),x)

[Out]

Exception raised: PolynomialError

________________________________________________________________________________________